package com.zy.oopthis;

public class Girl {
    private String name; //封装
    public void setName(String i){
        this.name = i; //实例的引用
    }
    public String getName(){
        return this.name;
    }
    public void marry(Boy boy){
        System.out.println(this.getName()+"和"+boy.getName()+"结婚。");
    }
}
